import 'package:flutter/material.dart';
import 'package:macnov/role_employee/more/morebody.dart';
import 'package:macnov/stores/company.dart';
import 'package:macnov/stores/signin.dart';

class More extends StatefulWidget {
  @override
  _MoreState createState() => _MoreState();
}

class _MoreState extends State<More> with AutomaticKeepAliveClientMixin {
  dynamic userinfo;
  dynamic avatar;

  @override
  void initState() {
    super.initState();
    _loadUserSetting();
    _loadAvatar();
    _getCompanySetting();
  }

  _loadAvatar() async {
    await signInStore.getAvatar();
  }

  _getCompanySetting() async {
    await companyStore.getCompanySetting();
  }

  _loadUserSetting() async {
    await signInStore.loadUserSetting();
  }

  @override
  Widget build(BuildContext context) {
    super.build(context);
    return MoreBody();
  }

  @override
  bool get wantKeepAlive => true;
}
